﻿using RabbitMQ.Client.Events;

namespace CTP.CRM.Core.Rabbit.Handler
{
    public interface IRabbitHandler
    {
        ConsumeOptions Options() => null;

        bool Enable(ConsumeOptions options) => options.Queue == Options()?.Queue;

        Task Handle(IServiceProvider sp, BasicDeliverEventArgs args, ConsumeOptions options);
    }
}
